//
//  Contact.m
//  Homework05
//
//  Created by Rain on 16/5/27.
//  Copyright © 2016年 Rain. All rights reserved.
//

#import "Contact.h"

@implementation Contact

- (instancetype)initWithName:(NSString *)name phoneNumber:(NSInteger)phoneNumber {
    
    self = [super init];
    
    if (self) {
        
        self.name = name;
        self.phoneNumber = phoneNumber;
        self.group = [[_name substringToIndex:1] uppercaseString];

    }
    
    return self;
    
}

- (NSString *)description {
    
    return [NSString stringWithFormat:@"name: %@, phoneNumber: %ld, group: %@", _name, _phoneNumber, _group];
    
}





@end
